package com.woniu.supermarket.vo;

import com.woniu.supermarket.entity.Category;
import com.woniu.supermarket.entity.Goods;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@ApiModel(description = "封装图片库的数据")
@Data
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class ImgsGoodsVo {
    @ApiModelProperty(value = "图片库id")
    private Integer id;
    @ApiModelProperty(value = "商品图片")
    private String imgName;
    @ApiModelProperty(value = "商品类别")
    private Category category;
    @ApiModelProperty(value = "商品类别")
    private Integer categoryId;
    @ApiModelProperty(value = "商品详情介绍")
    private String description;
    @ApiModelProperty(value = "图片库创建时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtCreate;

    public ImgsGoodsVo(String imgName, Category category, String description, Date gmtCreate) {
        this.imgName = imgName;
        this.category = category;
        this.description = description;
        this.gmtCreate = gmtCreate;
    }
}
